/*
 * Author: yezi
 * E-mail: okye328@gmail.com
 * Create time: Dec 26, 2012 11:16:42 PM
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 *
 */

package com.kanbox.linux;

import java.io.File;
import java.io.IOException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.client.ClientProtocolException;

import com.kanbox.linux.fs.MountPointManager;
import com.kanbox.linux.fs.fuse.KanboxFuseFileSystem;
import com.kanbox.linux.operation.FileList;
import com.kanbox.linux.operation.FileSynchronizer;
import com.kanbox.linux.token.TokenManager;

import fuse.FuseMount;

public class MainRunner {

	private static Log log = LogFactory.getLog(MainRunner.class);

	/**
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {

		// System.setProperty(
		// "java.library.path",
		// "/home/yezi/workspace/kanbox-for-linux/lib/native:"
		// + System.getProperty("java.library.path"));

		// set with -Djava.library.path=/
		
		
		// new FileSynchronizer().syncALL();

		FuseMount.mount(
				new String[] { // "-ononempty",
				"-f", "-s", MountPointManager.getMountPoint() },
				new KanboxFuseFileSystem(), log);

		// System.out.println(MountPointManager.getDataPath());

		// new FileList().listRecurse("/");
		// System.out.println("finish");

	}
}
